var e = require("../../libs/wxParse/wxParse.js"), t = require("../../utils/api"), a = require("../../utils/config"), i = require("../../utils/request");

Page({
    data: {},
    onLoad: function(e) {
        this.getHtmlPage(e);
    },
    getHtmlPage: function(a) {
        var r = this;
        i.request(i.HttpMethod.GET, t.apiRoute.selectWcaCourseArticleById + a.id, {}).then(function(t) {
            "20000" == t.code && e.wxParse("article", "html", t.data.content, r, 5);
        });
    },
    wxParseTagATap: function(e) {
        var t = e.currentTarget.dataset.src;
        if (console.log(t), -1 != t.indexOf("www") || -1 != t.indexOf("WWW") || -1 != t.indexOf("https") || -1 != t.indexOf("http")) wx.navigateTo({
            url: "/pages/webview/webview?h5=".concat(encodeURIComponent(t))
        }); else {
            var i = t.replace("https://", "");
            console.log("跳转商城小程序的页面：", i), wx.navigateToMiniProgram({
                appId: a.richShopAppletAppid,
                path: i
            });
        }
    }
});